package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    /**
     * //根据openid查询用户
     * @param openid
     * @return
     */
    @Select("select * from sky_take_out.user where openid=#{openid}")
    User getByOpenid(String openid);

    /**
     * //插入user数据,要用到主键值，要返回主键值
     * @param user
     */
    void insert(User user);

   // @Select("SELECT id, openid, name, phone, sex, id_number, avatar, create_time FROM sky_take_out.user WHERE id = #{userId}")
   // User getById(Long userId);
}


